/*
 * @Author: your name
 * @Date: 2022-03-07 09:41:52
 * @LastEditTime: 2022-03-07 09:43:07
 * @LastEditors: your name
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \trace-source-web\src\api\agr-safety-evaluation\evaluation-temple-manage\index.js
 */
/*
 * @Description: 评价模板
 */
import zhreq from "@/api/axios";
export default {
  /**
   * @description: 根据最上层评价指标获取表格数据
   * @param {String/Number} evaluationIndexId * 顶层指标id
   */
  getlist(evaluationIndexId) {
    return zhreq.get(`/v3/evaluation/evaluationContent/queryContent?evaluationIndexId=${evaluationIndexId}`);
  },
  /**
   * @description: 添加一条数据
   */
  addlist(params) {
    let zhenpar = {
      ...params
      // "evaluationContent": "",
      // "evaluationIndexId": 0,
      // "evaluationScore": 0,
      // "evaluationTechnicalList": [
      //   {
      //     "createTime": "",
      //     "createUserId": 0,
      //     "deduction": 0,
      //     "deleteFlag": true,
      //     "evaluationContentId": 0,
      //     "evaluationTechnicalId": 0,
      //     "evaluationTechnicalIdList": [],
      //     "technical": "",
      //     "timestamp": "",
      //     "updateUserId": 0
      //   }
      // ]
    }
    return zhreq.post("/v3/evaluation/evaluationContent/add", zhenpar);
  },
  /**
   * @description: 删除一条数据
   */
  editlist(params) {
    return zhreq.post("/v3/evaluation/evaluationContent/edit", params);
  },
  /**
   * @description: 删除一条数据
   */
  dellist(evaluationContentId) {
    return zhreq.get(`/v3/evaluation/evaluationContent/del?evaluationContentId=${evaluationContentId}`);
  },
  // ---------农安评价标准接口--------
  /**
   * @description: 条件查询接口
   */
  querbyconditonevaluationTechnicalId(evaluationContentId) {
    return zhreq.post(`/v3/evaluation/evaluationTechnical/queryByCondition`, {
      evaluationContentId: evaluationContentId
    });
  },
  /**
   * @description: 删除农安评价一条数据
   */
  dellistevaluationTechnical(evaluationTechnicalId) {
    return zhreq.get(`/v3/evaluation/evaluationTechnical/del?evaluationTechnicalId=${evaluationTechnicalId}`);
  }
};

